<template>
	<view class="main">
		<view v-if="closeFormShow == 1" class="agreement">
			<view class="content" v-html="content"></view>
			<u-button class="button" type="primary" text="同意并注销" @click="deleteModel = true"></u-button>
		</view>

		<view v-if="closeFormShow == 2" class="form">
			<view class="title">请核实账户信息</view>
			<u--form labelPosition="left" labelWidth="140rpx" :model="form" ref="form">
				<u-form-item label="账号" prop="mobile" borderBottom ref="item">
					<u--input v-model="form.mobile" border="none" disabledColor="#f1f1f1" disabled></u--input>
				</u-form-item>
				<u-form-item label="验证码" prop="mobile" borderBottom ref="item">
					<u-input v-model="form.code" border="none" placeholder="验证码">
						<template slot="suffix">
							<u-code ref="code" @change="codeChange" seconds="60"></u-code>
							<text class="tips" @click="getCode">{{ tips }}</text>
						</template>
					</u-input>
				</u-form-item>
			</u--form>
			<u-button class="button" type="primary" text="确认注销" @click="singOUTUser"></u-button>
		</view>

		<view v-if="closeFormShow == 3" class="signOut_true">
			<view class="icon">
				<u-icon name="checkmark-circle" color="#2979ff" size="90"></u-icon>
			</view>
			<view class="signOut_true_text">
				您的账户注销申请已提交，感谢您的使用，期待您的再次使用。如有疑问，可联系客服:19105603509。
			</view>
		</view>

		<u-modal :show="deleteModel" title="账户注销确认" content="提交申请后，您将无法登录、使用本帐号，账户注销后，您在本平台的所有权益也将一并失效。"
			:showCancelButton="true" confirmText="确认注销" cancelText="暂不注销" @cancel="deleteModel = false" @confirm="onClose">
		</u-modal>
	</view>
</template>

<script type="text/javascript" src="plus-confusion://../pages/my/settings/signOUT"></script>

<style lang="scss" scoped>
.main {
	min-height: 100vh;
	padding: 30rpx;
	background: #F1F1F1;

	.content {
		line-height: 38rpx;
	}

	.form {
		padding: 30rpx;
		text-align: center;

		.title {
			font-size: 38rpx;
			padding: 90rpx 0;
		}
	}

	.button {
		margin-top: 90rpx;
		height: 90rpx;
		width: 500rpx;
	}

	.tips {
		color: #50B674;
	}

	.signOut_true {
		text-align: center;
		padding-top: 200rpx;

		.icon {
			width: 100%;
			display: flex;
			justify-content: center;
		}

		.signOut_true_text {
			padding: 0 70rpx;
			padding-top: 36rpx;
			line-height: 1.6;
		}

	}
}
</style>
